package Atest;

import java.util.HashSet;

/**
 * @Author wangzhipeng
 * @Date 2020-08-26 8:42 上午
 * @Description
 */
public class WrappedString {
    private String s;
    public WrappedString(String s){
        this.s = s;
    }

    public static void main(String[] args) {
        HashSet<Object> hashSet = new HashSet<>();
        WrappedString ws1 = new WrappedString("aardvark");
        WrappedString ws2 = new WrappedString("aardvark");
        String s1 = new String("aardvark");
        String s2 = new String("aardvark");
        hashSet.add(ws1);
        hashSet.add(ws2);
        hashSet.add(s1);
        hashSet.add(s2);
        System.out.println(hashSet.size());
    }
}
